-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react-query-persist-client): remove unnecessary props spreading #8778
base: main
Are you sure you want to change the base?
fix(react-query-persist-client): remove unnecessary props spreading #8778
Conversation
manudeli
commented
Mar 8, 2025

View your CI Pipeline Execution ↗ for commit 9501361.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8778 +/- ##
============================================
+ Coverage 46.60% 100.00% +53.39%
============================================
Files 200 1 -199
Lines 7576 17 -7559
Branches 1743 2 -1741
============================================
- Hits 3531 17 -3514
+ Misses 3669 0 -3669
+ Partials 376 0 -376
🚀 New features to boost your workflow:
|
…sary-spread-operator
@@ -48,7 +47,7 @@ export const PersistQueryClientProvider = ({ | |||
}, [client, isRestoring]) | |||
|
|||
return ( | |||
<QueryClientProvider client={client} {...props}> | |||
<QueryClientProvider client={client}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better fix would be to not destruct client
, use props.client
everywhere, then do <QueryClientProvider {...props}>
here.
The idea is that if we add a new prop to QueryClientProvider
, it will also work here. That’s why the PersistQueryClientProviderProps
build on top of QueryClientProviderProps
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I agree, I reflected your review in bef7878
…sary-spread-operator
…sary-spread-operator
…sary-spread-operator
…sary-spread-operator